package com.pro.framework.web;


import jakarta.servlet.http.HttpServletRequest;

public class RequestUtil {

    /**
     * 获取完整请求URL，包括参数
     */
    public static String getRequestURL(HttpServletRequest request) {
        StringBuffer requestURL = request.getRequestURL();
        String queryString = request.getQueryString();
        return queryString == null
                ? requestURL.toString()
                : requestURL.append('?').append(queryString).toString();
    }
}
